﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CrawlerCore;
using WapCrawlerLib;

namespace WapCrawlerCore.WapCrawler
{
    public interface IWapSite
    {
        /// <summary>
        /// Bắt đầu crawler
        /// </summary>
        void StartCrawler();

        /// <summary>
        /// Step1: Get pages of a topic
        /// </summary>
        /// <param name="pageUrl"></param>
        void GetPages(string wapUrl, string pageUrl);

        /// <summary>
        /// Step2: Get items of a page
        /// </summary>
        /// <param name="pageUrl"></param>
        /// <returns></returns>
        string GetItemsOfPage(string pageUrl);

        /// <summary>
        /// Step3: Get full item info
        /// </summary>
        /// <param name="postUrl"></param>
        /// <param name="topicName"></param>
        void GetItem(string postUrl, string topicName);
        //void GetItem(string itemUrl, string title, string headContent, string thumbnailUrl);

        /// <summary>
        /// Test crawl a page
        /// </summary>
        /// <param name="pageUrl"></param>
        /// <param name="postTitle"></param>
        void Test(string pageUrl, string postTitle);
    }
}
